package com.ruoyi.constant.v3;

import java.util.ArrayList;

/**
 * 任务状态
 *
 * @author liuliya
 */
public enum RwZtV3Enum {

    RW_CREATE(0, "任务创建"),
    SHENG_XF_SHI(1, "省下发到市"),
    SHI_XF_XIAN(2, "市下发到县"),
    XIAN_XF_HCD(3, "县下发核查队"),
    HCD_SB_XIAN(4, "核查队上报县"),
    XIAN_SHENGHE(5, "县审核通过"),
    XIAN_SB_SHI(6, "县上报到市"),
    SHI_SHENHE(7, "市审核通过"),
    SHI_SB_SHENG(8, "市上报到省"),
    SHENG_SHENHE(9, "省审核通过"),

    TH(100, "任务退回"),
//    RWXXGX(200, "任务信息更新"),
    RWLQ(201, "任务领取"),
    //==============================自主核查模式=====================================//
    SHENG_XF_HCD(1000, "省下发核查队"),
    HCD_SB_SHENG(1001, "核查队上报省"),

    SHI_XF_HCD(2000, "市下发核查队"),
    HCD_SB_SHI(2001, "核查队上报市");
//    SHI_SH_HCD(2002, "市审核核查队");

    private Integer code;
    private String desc;

    RwZtV3Enum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (RwZtV3Enum value : RwZtV3Enum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }

    public static ArrayList<Integer> getCodes(){
        ArrayList<Integer> integers = new ArrayList<>();
        //核查队上报县
        integers.add(HCD_SB_XIAN.getCode());
        //县审核通过
        integers.add(XIAN_SHENGHE.getCode());
        //县上报到市
        integers.add(XIAN_SB_SHI.getCode());
        //市审核通过
        integers.add(SHI_SHENHE.getCode());
        //市上报到省
        integers.add(SHI_SB_SHENG.getCode());
        //省审核通过
        integers.add(SHENG_SHENHE.getCode());
        //核查队上报到市
        integers.add(HCD_SB_SHI.getCode());
        //核查队上报到省
        integers.add(HCD_SB_SHENG.getCode());
        return integers;
    }

    public static ArrayList<Integer> getAi(){
        ArrayList<Integer> integers = new ArrayList<>();
        //省审核通过
        integers.add(SHENG_SHENHE.getCode());
        return integers;
    }
}   
